#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <unordered_map>
#include <vector>
#include <set>
#include <queue>

using namespace std;
using LL = long long;
using PII = pair<int, int>;

const int N = 2007;

int n;
int q[N];

int main(){
#ifdef LOCALFLAG
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif


    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    cin >> n;
    for(int i = 1; i <= n * 2; i ++) cin >> q[i];

    sort(q + 1, q + 2 * n + 1);

    LL sum[2];
    sum[0] = sum[1] = 0;
    for(int i = 1; i <= n * 2; i ++) {
        sum[(i - 1) / n] += (LL) q[i];
    }

    if(sum[0] != sum[1]){
        for(int i = 1; i <= 2 * n; i ++) cout << q[i] << " ";
    }else{
        cout << -1 << '\n';
    }

    return 0;
}